/** *
 * 各个方法传入参数均为以下格式(具体参数依照事件对待)
 * cb 回调函数
 * obj = {
 *      fileName: '文件名',
 *      content: '内容',
 *      binary: true // 使用二进制形式
 * }
 */
class browserView extends eventClass {
    constructor() {
        super('browserView');
    }

    openBrowserView(cb, { width = 350, height = 700, frame = true, modal = false, url, closeUrl }) {
        const win = new BrowserWindow({
            width,
            height,
            frame,
            modal,
        });
        closeUrl = closeUrl || url;
        win.loadURL(url); // 'https://code.earthengine.google.com'
        webContent.on('dom-ready', (e) => {
            // return;
            const url = webContent.getURL();
            if (url.indexOf(closeUrl) === 0) { // 'https://code.earthengine.google.com'
                this.returnMethod(cb, {});
                win.destroy();
                loginWin.win = null;
            }
        });
    }
}
